package com.cc8w.admin.service;

import com.cc8w.dao.DaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cc8w.admin.entity.AdminUserPojo;
import com.cc8w.admin.mapper.UserMapper;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@Service("adminuserservice")
public class UserService {
	@Autowired
	@Qualifier("aminisermapper")
	private UserMapper adminUserMapper;
	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/**
	 * 查找用户
	 */
	
	public AdminUserPojo getUserByName(String username,String password) {
		return adminUserMapper.getUserByName(username,password);
	}
	/**
	 * 查询所有用户
	 */
	public List<AdminUserPojo> getUserAll(){
		return adminUserMapper.getUserAll();
	}

	public List<AdminUserPojo> getUserList(int page,int size){
		return adminUserMapper.getUserList(page,size);
	}
	public List<AdminUserPojo> getUserPageList(HashMap aup){
		return adminUserMapper.getUserPageList(aup);
	}
	public int getUserPageCount(HashMap aup){
		return adminUserMapper.getUserPageCount(aup);
	}

	
	
	
}
